﻿"use strict";

angular.module('ecDashboard').directive('ecDashboard',
    function () {
        return {
            templateUrl: '/ext-modules/ecDashboard/ecDashboardTemplate.html',
            link: function (scope, element, attr) {
                scope.addNewWidget = function (widget) {
                    var newWidget = angular.copy(widget.settings);
                    scope.widgets.push(newWidget);
                }
            }
        };
    });